package com.gjy.kafka.sb.consumer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Service;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-12-23 11:51:29
 */
@Service
public class KafkaConsumer {

    private static final Logger log = LoggerFactory.getLogger(KafkaConsumer.class);

    @KafkaListener(topics = {"kk"}, groupId = "my-group-id")
    public void consumer(String msg) {
        log.info("received: {}", msg);
    }
}
